<template>
	<view class="mainCss">
		<view class="titleBox">
			<view class="titleLeft">
				<img src="../../static/title/back.png" class="titleBack" @click="goBack">
			</view>
			<view class="titleText">
				<text>办公转让详情</text>
			</view>
			<view class="titleRight">

			</view>
		</view>
		<view class="bannerBox">
			<swiper style="height: 300rpx;" autoplay="true" interval="3000" duration="500" circular="true">
				<swiper-item v-for="(item, index) in RoomInsideImage" :key="index">
					<view class="swiper-item">
						<image :src="Url + item" class="banner"></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<view class="bodyBox">
			<view class="infoBox">
				<view class="infoTitle">
					<text>{{detailList.Title}}</text>
				</view>
				<view class="infoTop">
					<view class="infoTopBox">
						<view class="topCont">
							<text>{{detailList.Aera}}m²</text>
						</view>
						<view class="tips">
							<text>面积</text>
						</view>
					</view>
					<view class="infoTopBox">
						<view class="topCont">
							<text>{{detailList.TradePrice}}元/月</text>
						</view>
						<view class="tips">
							<text>付款金额</text>
						</view>
					</view>
					<view class="infoTopBox">
						<view class="topCont">
							<text>{{detailList.DistinctName}}</text>
						</view>
						<view class="tips">
							<text>门店区域</text>
						</view>
					</view>
				</view>
				<view class="allInfo">
					<view class="smallTitle">
						<text>房源描述</text>
					</view>
					<view class="firstCont">
						<view class="contentBox">
							<view class="tips1">
								<text>位置</text>
							</view>
							<view class="content">
								<text>{{detailList.Address}}</text>
							</view>
						</view>
						<view class="contentBox">
							<view class="tips">
								<text>楼层编号</text>
							</view>
							<view class="content" style="white-space: nowrap;">
								<text>{{detailList.FloorNum}}号</text>
							</view>
						</view>
					</view>
					<view class="contentBox">
						<view class="tips1">
							<text>类型</text>
						</view>
						<view class="content">
							<text v-if="detailList.BulidType == 1">纯写字楼</text>
							<text v-if="detailList.BulidType == 2">商业综合体</text>
							<text v-if="detailList.BulidType == 3">商务公寓</text>
							<text v-if="detailList.BulidType == 4">商务酒店</text>
						</view>
					</view>
					<view class="contentBox">
						<view class="tips1">
							<text>楼层</text>
						</view>
						<view class="content">
							<text>{{detailList.FromFloor}}-{{detailList.TillFloor}}层</text>
						</view>
					</view>
					<view class="contentBox">
						<view class="tips1">
							<text>工位数</text>
						</view>
						<view class="content">
							<text>{{detailList.WorkStations}}</text>
						</view>
					</view>
					<view class="contentBox">
						<view class="tips1">
							<text>装修</text>
						</view>
						<view class="content">
							<text>{{detailList.Fixture}}</text>
						</view>
					</view>
					<view class="contentBox">
						<view class="tips1">
							<text>租期</text>
						</view>
						<view class="content">
							<text>{{detailList.ShortestTrade}}个月</text>
						</view>
					</view>
					<view class="contentBox">
						<view class="tips1">
							<text>物业费</text>
						</view>
						<view class="content">
							<text>{{detailList.PropertyCost}}元/㎡</text>
						</view>
					</view>
					<view class="smallTitle">
						<text>房源亮点</text>
					</view>
					<view class="contentBox">
						<view class="tips">
							<text>配套设施</text>
						</view>
						<view class="content">
							<text>{{detailList.Surportings}}</text>
						</view>
					</view>
					<view class="contentBox">
						<view class="tips">
							<text>商铺优势</text>
						</view>
						<view class="content">
							<text>{{detailList.Advantage}}</text>
						</view>
					</view>
				</view>
				<view class="smallTitle">
					<text>办公位置</text>
				</view>
				<view class="mapBox">
					<map :latitude="detailList.latitude" :longitude="detailList.Longitude" show-location="true"
						style="width: 100%; height: 100%;"></map>
				</view>
				<view class="business">
					<img :src="BasicInfo.headImg" class="businessHead">
					<text>发布人:{{BasicInfo.nickName}}</text>
				</view>
			</view>
		</view>
		<view class="block">

		</view>
		<view class="footerBox">
			<view class="toolbar">
				<view class="leftTool">
					<view class="iconBox">
						<img src="../../static/lease/shoucang.png" class="collection" v-show="!shoucang"
							@click="shoucang = !shoucang">
						<img src="../../static/lease/shoucang1.png" class="collection" v-show="shoucang"
							@click="shoucang = !shoucang">
						<text v-show="!shoucang">收藏</text>
						<text v-show="shoucang">已收藏</text>
					</view>
					<view class="iconBox">
						<img src="../../static/lease/fenxiang.png" class="collection">
						<text>分享</text>
					</view>
				</view>
				<view class="rightTool">
					<view class="buttonView">
						<img src="../../static/lease/xiaoxi.png" class="xiaoxi">
						<text>微聊</text>
					</view>
					<button class="toolButton">在线支付</button>
					<img src="../../static/lease/tishi.png" class="tipsIcon">
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				Url: 'https://ypsf.huashengzhuan.cn',
				bannerList: [{
					imgUrl: '../../static/lease/leaseBg.png',
				}, {
					imgUrl: '../../static/lease/leaseBg.png',
				}, {
					imgUrl: '../../static/lease/leaseBg.png',
				}, {
					imgUrl: '../../static/lease/leaseBg.png',
				}],
				shoucang: false,
				shopName: '木渎便利店',
				area: '200m²',
				price: 5000,
				region: '吴中区',
				place: '吴中区木渎镇月清街12-8号',
				identifier: 12,
				type: '生活超市',
				norms: 12345,
				datum: '精装修',
				facilities: '电梯，安保',
				fit: '两年',
				advantage: '近地铁，周边设备齐全',
				describe: 100,
				detailList:[],
				RoomInsideImage:[],
				BasicInfo:[],
			}
		},
		onLoad(option) {
			this.id = option.id
			console.log(option.id)
			this.$myRequest({
				url: 'OfficeDetail',
				data: {
						OfficeID: option.id,
					},
					dataType: 'json',
			}).then(res => {
				this.detailList = res.data;
				console.log(this.detailList)
				this.RoomInsideImage = res.data.RoomInsideImage
				this.RoomInsideImage = this.RoomInsideImage.split(',')
				console.log(this.RoomInsideImage)
				this.BasicInfo = JSON.parse(this.detailList.BasicInfo)
				console.log(this.BasicInfo)
			})
		},
		methods: {
			// 返回
			goBack() {
				uni.navigateBack(0)
			},
		}
	}
</script>

<style>
	@import '../../css/details.css';
	
	.smallTitle {
		width: 100%;
		color: #FF5F17;
		font-size: 14px;
	}
	
	.tips1 {
		width: 90rpx;
		text-align: right;
		color: #A8A8A8;
		font-size: 12px;
		white-space: nowrap;
	}
</style>